﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VK.Comm.Session;
using VK.Casemeet.Members;
using VK.Comm;

namespace VK.Casemeet.Web.Front
{
    public partial class FindPassSend : System.Web.UI.Page
    {
        public string strMessage = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            MemberEntity member = SessionOperate<MemberEntity>.GetEntity("FindPassEmail");

            string content = "亲爱的" + member.Nickname + ",您好：\n\n " +
                    "请点击这里，修改您的密码：\n " +
                    CS.SiteUrl + "FindPassEdit/" + member.ValidateCode + ".html \n " +
                    "(如果链接无法点击，请将它拷贝到浏览器的地址栏中。)\n\n " +
                    "中国户外探险联盟\n " +
                    DateTime.Now.ToLongDateString() + "\n\n " +
                    "此电邮为系统自动发出，请勿回复。\n ";
            if (MailHandle.ResetPassSend(member.Email, "中国户外探险联盟", "您在中国户外探险联盟的找回密码邮件", content))
            {
                strMessage = "我们已发送密码修改信息到您的邮箱：" + member.Email + "<br />请在 2 天内登录您的注册邮箱查收邮件并完成密码修改。";
            }
            else
            {
                strMessage = "邮件发送失败！";
            }
        }
    }
}